this.BX=this.BX||{};this.BX.Landing=this.BX.Landing||{};this.BX.Landing.UI=this.BX.Landing.UI||{};(function(e,t,r,n,i){"use strict";var o;function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){babelHelpers.defineProperty(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var l=function e(){babelHelpers.classCallCheck(this,e)};babelHelpers.defineProperty(l,"Primary","primary");babelHelpers.defineProperty(l,"Grey","grey");var c={text:"",color:l.Primary,attrs:{},style:{}};var p=function(e){babelHelpers.inherits(t,e);function t(e){var n;babelHelpers.classCallCheck(this,t);n=babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(t).call(this));n.setEventNamespace("BX.Landing.UI.Component.Link");n.subscribeFromOptions(i.fetchEventsFromOptions(e));n.options=s(s({},c),e);n.cache=new r.Cache.MemoryCache;return n}babelHelpers.createClass(t,[{key:"getTag",value:function e(){var t=this;return this.cache.remember("tag",(function(){return r.Type.isStringFilled(t.options.href)?"a":"span"}))}},{key:"getLayout",value:function e(){var t=this;return this.cache.remember("layout",(function(){var e=t.getTag();var n=r.Tag.render(o||(o=babelHelpers.taggedTemplateLiteral(["\n\t\t\t\t<",'\n\t\t\t\t\tclass="landing-ui-component-link landing-ui-component-link-color-','"\n\t\t\t\t\tonclick="','">',"</",">\n\t\t\t"])),e,t.options.color,t.onClick.bind(t),t.options.text,e);if(e==="a"){r.Dom.attr(n,"href",t.options.href)}if(e==="a"&&r.Type.isStringFilled(t.options.target)){r.Dom.attr(n,"target",t.options.target)}r.Dom.attr(n,t.options.attrs);r.Dom.style(n,t.options.style);return n}))}},{key:"onClick",value:function e(t){if(this.getTag()==="span"){t.preventDefault()}this.emit("onClick")}}]);return t}(n.EventEmitter);babelHelpers.defineProperty(p,"Colors",l);e.Link=p})(this.BX.Landing.UI.Component=this.BX.Landing.UI.Component||{},BX,BX,BX.Event,BX.Landing.UI.Component);
//# sourceMappingURL=link.bundle.map.js